-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tr1/lara/cheat: reset meshes in fly cheat #2571
Conversation
Download the built assets for this pull request: |
Everything looks good, thank you. 👍 I did find a bug with Lara holding a shotgun in one hand, but I don't think it's related to this PR as it's already on develop, will raise an issue shortly. |
d6b2cf3
to
8d20aab
Compare
Thanks, should be addressed. Easiest just to do it here as it's all so related. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, should be addressed. Easiest just to do it here as it's all so related.
Your fix did the trick. Thank you. 😄
src/tr1/game/lara/cheat.c
Outdated
Gun_SetLaraHolsterLMesh(holsters_gun_type); | ||
Gun_SetLaraHolsterRMesh(holsters_gun_type); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is duplicated from somewhere isn't it? I think Lara_InitialiseMeshes. Any chance we can avoid duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, Lara_InitialiseMeshes
uses RESUME_INFO
though, so doesn't take into account guns she currently has, plus it results in the original bug with #2461. Maybe we could change the signature though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but it'd be nice to merge the common parts, possibly through a new, third function.
WDYT about getting rid of |
This will make adding a potential option to change costumes at runtime more difficult; can we use a hybrid solution? |
Sure, I'll take another look tomorrow 👍 |
8d20aab
to
481597f
Compare
Hybrid approach is now in place, so we just have a single function. This will need testing again I'm afraid, especially going between levels, and in Natla's Mines with gun loss. Also, going from the gym to a game level, or back to the gym via a save or otherwise, to ensure the costume swap behaves normally. |
These scenarios and the linked issues LGTM. The only issue I found is that Lara's holstered weapons revert to pistols between levels if she has magnums/uzis holstered and the shotgun equipped. |
Resolves LostArtefacts#2565. Resolves LostArtefacts#2572.
481597f
to
b4428f6
Compare
Thanks, @aredfan. Hopefully that's fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @aredfan. Hopefully that's fixed now.
Can confirm, thank you. 👍
Resolves #2565.
Resolves #2572.
Checklist
Description
This restores Lara's meshes if she is resurrected with the fly cheat. The only scenario we can't efficiently cover is the following:
In this case the holstered guns will be pistols because we don't store the last holstered gun type, and looking it up would involve a lot of mesh comparison which I don't feel is worth it, plus for things like the T-Rex and Midas deaths, the information is lost anyway. If the last gun is not the shotgun, the correct holster meshes will be restored normally.
Otherwise, other scenarios should hopefully work as expected 🤞 Worth checking #2461 too.